package com.tanhua.sso.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 配置拦截登录路径
 */
@Configuration
public class WebConfigsso implements WebMvcConfigurer {
    @Bean
    public Freezelogin getrediis(){
        return new Freezelogin();
    }
    @Autowired
    private Freezelogin freezelogin;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(this.freezelogin).addPathPatterns("/user/login");
    }
}
